Proof of extreme value theorem